//
//  VVSportTrack.h
//  DingDingSport
//
//  Created by 王惠平 on 2017/4/22.
//  Copyright © 2017年 will wang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import "VVSportPolyline.h"

typedef enum : NSUInteger {
    VVSportTypeWalking,
    VVSportTypeRunning,
    VVSportTypeRiding,
    
} VVSportType;

typedef enum : NSUInteger {
    VVSportStatePause, //暂停
    VVSportStateContinue, //继续
    VVSportStateFinish, //结束
} VVSportState; //运动类型

typedef enum : NSUInteger {
    VVSportGPSStateDisconnect, // 断开
    VVSportGPSStateBad,   //差
    VVSportGPSStateNormal,  //一般
    VVSportGPSStateGood,   //好
} VVSportGPSState; //GPS状态


@interface VVSportTrack : NSObject

//添加折线
- (VVSportPolyline *)appendPolylineWithDestCoord:(CLLocation *)dest;

//起点大头针模型
@property (nonatomic, strong, readonly) MAPointAnnotation *startAnno;

//运动类型
@property (nonatomic, assign, readonly) VVSportType sportType;

//运动类型图片
@property (nonatomic, copy, readonly) NSString *sportTypeImageName;

//运动状态
@property (nonatomic, assign) VVSportState sportState;

//总距离 km
@property (nonatomic, assign, readonly) CGFloat totalDistance;

//总时长 s
@property (nonatomic, assign, readonly) CGFloat totalTime;

//最大速度 km/hour
@property (nonatomic, assign, readonly) CGFloat maxSpeed;

//平均速度 km/hour
@property (nonatomic, assign, readonly) CGFloat avgSpeed;

//时间字符串
@property (nonatomic, copy, readonly) NSString *timeStr;


 /**
 开始运动
 
 @param sportType 运动类型
 @return 运动轨迹模型
 */
- (instancetype)initWithSportType:(VVSportType)sportType withSportState:(VVSportState)state;

@end
